Platform Explorer / Nuxeo Platform 2021

Extension point versioningRules

Documentation

CAUTION: Deprecated since 9.1, use policies, filters and restrictions extension points. Compatibility is provided, contribution to this endpoint will be converted to new contributions in order to preserve the initial state and options. The default contribution will be converted to a policy with an order equals to 10000, and each versioningRule will have an order equals to 10000 - idx where idx is the index of rule in VersioningComponent.

Extension point defining default versioning rules or versioning rules by document type. Contributions to this XP are available for VersioningService implementing ExtendableVersioningService interface.

Example:

    <defaultVersioningRule>
        <initialState major="1" minor="0"/>
        <options lifeCycleState="*">
            <none default="true"/>
            <minor/>
            <major/>
        </options>
        <options lifeCycleState="approved">
            <none default="true"/>
            <minor/>
        </options>
    </defaultVersioningRule>
    <versioningRule enabled="true" typeName="File">
        <initialState major="1" minor="1"/>
        <options lifeCycleState="project">
            <none/>
            <minor default="true"/>
        </options>
        <options lifeCycleState="approved"/>
    </versioningRule>

The defaultVersioningRule will be used for all the document types if no specific versioningRule is contributed.

typeName attribute is only available for versioningRule tag and should be the name of a document type.

Initial state is the initial version number of the document. Default is 0.0 .

Options tag contains the different increment option available when saving a document. Only none, minor and major tags are used. If the default attribute isn't set, the first tag will be used as default. Options tag should always have the lifeCycleState attribute. The life cycle state name "*" can be used to match any state: it'll be used by default if no other option with a matching state exists.

Following option gives no increment saving option when the current lifeCycle of the document is approved.

    <options lifeCycleState="approved"/>

Following options removes major increment option and set the minor increment option as default choice.

    <options lifeCycleState="project">
        <none/>
        <minor default="true"/>
    </options>

If no option is specified, the defaultVersioningRule is used. If there is no defaultVersioningRule, we fall back on the service implementation.

@Since 5.4.2

Contribution Descriptors

  • Class: org.nuxeo.ecm.core.versioning.VersioningRuleDescriptor
  • Class: org.nuxeo.ecm.core.versioning.DefaultVersioningRuleDescriptor

Contributions

No known contributions.